package me.zhengjie.nmi;

import lombok.Getter;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

/**
 * @Author: 夏洪波
 * @Date: 2024/11/12 17:12
 * @Description: 新医保接口
 */
@Configuration
@Getter
public class ChsInterfaceConfig {

    /**
     * token地址
     */
    public static String tokenUrl;

    /**
     * 服务地址
     */
    public static String serverUrl;

    /**
     * 文件地址
     */
    public static String fileUrl;


    /**
     * 授权范围
     */
    public static String scopeServer;

    /**
     * 授权类型
     */
    public static String grantTypePassword;
    public static String grantTypeRefreshToken;

    /**
     * 字符集
     */
    public static String charsetUtf8;


    /**
     * 接收方系统代码
     * recer_sys_code001
     */
    public static String recerSysCode001;

    /**
     * 接口版本号
     */
    public static String infver;

    @Value("${chsinterface.tokenUrl}")
    public void setTokenUrl(String tokenUrl) {
        this.tokenUrl = tokenUrl;
    }

    @Value("${chsinterface.serverUrl}")
    public void setServerUrl(String serverUrl) {
        this.serverUrl = serverUrl;
    }

    @Value("${chsinterface.fileUrl}")
    public void setFileUrl(String fileUrl) {
        this.fileUrl = fileUrl;
    }

    @Value("${chsinterface.scopeServer}")
    public void setScopeServer(String scopeServer) {
        this.scopeServer = scopeServer;
    }

    @Value("${chsinterface.grantTypePassword}")
    public void setGrantTypePassword(String grantTypePassword) {
        this.grantTypePassword = grantTypePassword;
    }

    @Value("${chsinterface.grantTypeRefreshToken}")
    public void setGrantTypeRefreshToken(String grantTypeRefreshToken) {
        this.grantTypeRefreshToken = grantTypeRefreshToken;
    }

    @Value("${chsinterface.charsetUtf8}")
    public void setCharsetUtf8(String charsetUtf8) {
        this.charsetUtf8 = charsetUtf8;
    }

    @Value("${chsinterface.recerSysCode001}")
    public void setRecerSysCode001(String recerSysCode001) {
        this.recerSysCode001 = recerSysCode001;
    }

    @Value("${chsinterface.infver}")
    public void setInfver(String infver) {
        this.infver = infver;
    }
}
